﻿@using Login.OSIRISService
@model Login.Models.StudentModel

@{
    ViewBag.Title = "Studenten";
}

<h2>Studenten</h2>
Gebruik onderstaand formulier om studenten toestemming te geven om af te studeren. Met dit formulier kun je ook de toestemming vanuit
OSIRIS overrulen.
@if (ViewBag.Saved != null && ViewBag.Saved)
{
    <br /><br />
    <span style="color: #A9B734">Het formulier is succesvol opgeslagen</span>
}
<br /><br />
@using (Html.BeginForm())
{
    <table class="student">
        <thead>
            <tr>
                <th style="width: 200px">Student</th>
                <th style="width: 80px">Nummer</th>
                <th>Studiepunten</th>
                <th align="center">Toestemming OSIRIS</th>
                <th align="center">Toestemming SLB</th>
                <th>&nbsp;</th>
            </tr>
        </thead>
        <tbody>
            @for (int i = 0; i < Model.Entries.Count; ++i)
            {
                <tr>
                    <td>@Model.Entries[i].Name @Html.HiddenFor(model => model.Entries[i].Name)</td>
                    <td>@Model.Entries[i].Number @Html.HiddenFor(model => model.Entries[i].Number)</td>
                    <td>@Model.Entries[i].Points @Html.HiddenFor(model => model.Entries[i].Points)</td>
                    <td align="center">@Html.CheckBoxFor(model => model.Entries[i].HasPermissionOSIRIS)</td>
                    <td align="center">@Html.CheckBoxFor(model => model.Entries[i].HasPermissionSLB)</td>
                    <td><a href="@Url.Action("Detail")?number=@Model.Entries[i].Number">Bekijk gegevens uit OSIRIS</a></td>
                </tr>
            }
            <tr>
                <td colspan="6">&nbsp;</td>
            </tr>
            <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td align="right"><input type="submit" value="Opslaan" /></td>
                <td>&nbsp;</td>
            </tr>
        </tbody>
    </table>
}